package com.zdpx.wordgen.utils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;


/**
 * ClassName: com.wisesoft.xodb.common.util.HttpServletUtil
 * Name:HttpServletUtil
 * Author: xiong-feng
 * Date: 2021/12/9 8:54
 * Description: 获取http信息
 */
public class HttpServletUtil {
    /**
     * Description:  获取request请求域
     * Author: xiong-feng
     * Date: 2021/12/9
     */
    public static HttpServletRequest getRequest(){
        return ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getRequest();
    }
    public static String getPostData()
    {
        return "data";
    }
    /**
     * Description:  获取response响应域
     * Author: xiong-feng
     * Date: 2021/12/9
     */
    public static HttpServletResponse getResponse(){
        return ((ServletRequestAttributes) RequestContextHolder.currentRequestAttributes()).getResponse();
    }

}

